<template>
	<view class="all">
		<view class="top">
			<text>学习数据</text>
			<image src="@/static/img/fx.png" />
		</view>
		<view class="">
			<liuyuno-tabs :tabData="list" :activeIndex="current" @tabClick='tabClick' :pingfen='false' back='#F6F6F6' />
		</view>
		<view class="carp">
			<view class="carp_1">
				<view class="carp_1_2">
					<text>
						<label>1141</label>
						分钟</text>
					<text>2021年10月 本月</text>
				</view>
				<view class="carp_1_3">
					<image src="@/static/img/up.png" />
					<text>相比上月</text>
					<text>-56%</text>
				</view>
			</view>
			<qiun-data-charts  
			:opts='opts'
			type="column" :chartData="chartData" />
		</view>
		<view class="carp" v-if="current==0">
			<text class="bt" style="margin-bottom: 10rpx;">学习时间段分布</text>
			<qiun-data-charts
			:opts='opts'
			type="column" :chartData="chartData" />
		
		</view>
		<view class="carp" v-else>
			<text class="bt" style="margin-bottom: 10rpx;">学习概括</text>
			<view class="carpw">
				<view class="carp2" v-for="(item,index) in 7">
					<view class="carp2_1">
						<text>10</text>
						<text>个</text>
					</view>
					<view class="carp2_2">
						视频
					</view>
				</view>
			</view>

		</view>
		<view class="carp">
			<text class="bt">学习历史</text>
			<view v-for="(item,index) in 3">
				<view class="carp_01">
					<image
						src="https://img1.baidu.com/it/u=1695620879,2798080271&fm=253&fmt=auto&app=138&f=JPEG?w=705&h=470" />
					<view class="carp_01_1">
						<text>存在主义哲学限时免费</text>
						<text>面对教育的诸多问题、比如招生、管理、盈利如何保持学校的高...</text>
					</view>

				</view>
				<view class="xian">
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				chartData: {
					categories: ["0803", "0804", "0805", "0806", "0807", "0808", "0809", "0810"],
					position:['right'],
					series: [{
						name: "目标值",
						data: [350, 360, 310, 330, 130, 340, 130, 340],
						color:'#C7C6CD'
					}]
				},
				list: [{
						name: '日',
						width: '120rpx'
					}, {
						name: '周',
						width: '120rpx'
					},
					{
						name: '月',
						width: '120rpx'
					},
					{
						name: '总计',
						width: '150rpx'
					}
				],
				current: 0
			};
			1
		},
		methods: {
			tabClick(a, b) {
				this.current = b
			}
		}
	}
</script>

<style lang="scss">
	.xian {
		height: 1rpx;
		background-color: #EFEFEF;
		margin-top: 20rpx;
	}

	.all {
		min-height: 1800rpx;
		background-color: #F6F6F6;

		.carp {
			padding: 20rpx 20rpx 0rpx 20rpx;
			background-color: white;
			margin: 20rpx auto;
			clear: both;
			border-radius: 16rpx;
			width: 90%;

			.carp_01 {
				display: flex;
				padding-top: 25rpx;

				image {
					width: 240rpx;
					height: 156rpx;
					border-radius: 8rpx;
				}

				.carp_01_1 {
					width: 70%;
					padding-left: 20rpx;


					text:nth-of-type(2) {
						margin-top: 20rpx;
						display: block;
						font-size: 24rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #91969A;
						opacity: 1;
					}

					text:nth-of-type(1) {
						display: block;
						font-size: 32rpx;
						font-family: Source Han Sans CN;
						font-weight: bold;
						color: #333333;
						opacity: 1;
					}
				}
			}

			.carpw {
				display: flex;
				flex-wrap: wrap;
			}

			.carp2 {
				width: 25%;
				text-align: center;
				margin-bottom: 20rpx;

				.carp2_2 {
					font-size: 26rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #91969A;
					opacity: 1;
					display: inline-block;
					margin-top: 10rpx;
				}

				.carp2_1 {
					text:nth-of-type(2) {
						display: inline-block;
						margin-left: 10rpx;
						font-size: 20rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #91969A;
						opacity: 1;
					}

					text:nth-of-type(1) {
						font-size: 42rpx;
						font-family: HarmonyOS Sans;
						font-weight: bold;
						color: #333333;
						opacity: 1;
					}
				}
			}

			.bt {
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				display: inline-block;
				color: #141414;
				opacity: 1;
			}

			.carp_1 {
				display: flex;
				justify-content: space-between;

				.carp_1_3 {
					display: flex;
					align-items: center;
					align-items: flex-end;

					image {
						width: 24rpx;
						height: 24rpx;
						margin-right: 10rpx;
					}

					text:nth-of-type(1) {
						font-size: 20rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #7B7B7B;
						opacity: 1;
					}

					text:nth-of-type(2) {

						font-size: 30rpx;
						font-family: HarmonyOS Sans;
						font-weight: bold;
						color: #EE3E3E;
						opacity: 1;
					}
				}

				.carp_1_2 {
					text {
						display: block;
					}

					text:nth-of-type(1) {
						label {
							font-size: 35rpx;
							font-family: Source Han Sans CN;
							font-weight: 400;
							color: #FFD500;
							margin-right: 10rpx;
							opacity: 1;
						}

						font-size: 23rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #7B7B7B;
						opacity: 1;
					}

					text:nth-of-type(2) {
						margin-top: 10rpx;
						font-size: 20rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #7B7B7B;
						opacity: 1;
					}
				}
			}
		}

		.top {
			padding: 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			image {
				width: 35rpx;
				height: 35rpx;
			}

			text {
				font-size: 42rpx;
				font-family: Source Han Sans CN;
				font-weight: bold;
				color: #141414;
				opacity: 1;
			}
		}
	}
</style>
